import request from '@/utils/request'

// 查询转换列表
export function listTrans(query) {
  return request({
    url: '/datafactory/trans/list',
    method: 'get',
    params: query
  })
}

// 查询转换列表
export function getTransList(query) {
  return request({
    url: '/datafactory/trans/getTrans',
    method: 'get',
    params: query
  })
}

// 查询转换详细
export function getTrans(id) {
  return request({
    url: '/datafactory/trans/' + id,
    method: 'get'
  })
}

// 新增转换
export function addTrans(data) {
  return request({
    url: '/datafactory/trans',
    method: 'post',
    data: data
  })
}

// 修改转换
export function updateTrans(data) {
  return request({
    url: '/datafactory/trans',
    method: 'put',
    data: data
  })
}

// 删除转换
export function delTrans(id) {
  return request({
    url: '/datafactory/trans/' + id,
    method: 'delete'
  })
}
// 启动
export function startTrans(id){
  return request({
    url: '/trans/startTrans.do?id=' + id,
    method: 'get'
  })
}
// 禁止
export function stopTrans(id){
  return request({
    url: '/trans/stopTrans.do?id=' + id,
    method: 'get'
  })
}
